package com.zygh.policeasset.service;

import com.github.pagehelper.PageHelper;
import com.github.pagehelper.PageInfo;
import com.zygh.policeasset.mapper.DepreciationPolicyMapper;
import com.zygh.policeasset.pojo.DepreciationPolicy;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Service;

@Service
/* loaded from: police-asset-2.0-0.0.1-SNAPSHOT.jar:BOOT-INF/classes/com/zygh/policeasset/service/DepreciationPolicyService.class */
public class DepreciationPolicyService {
    @Autowired
    DepreciationPolicyMapper depreciationPolicyMapper;

    public Integer add(DepreciationPolicy depreciationPolicy) {
        return this.depreciationPolicyMapper.add(depreciationPolicy);
    }

    public Integer delete(Integer id) {
        return this.depreciationPolicyMapper.delete(id.intValue());
    }

    public Integer update(DepreciationPolicy depreciationPolicy) {
        return this.depreciationPolicyMapper.update(depreciationPolicy);
    }

    public PageInfo<DepreciationPolicy> selectList(int pageNum, int pageSize) {
        PageHelper.startPage(pageNum, pageSize);
        return new PageInfo<>(this.depreciationPolicyMapper.findAll());
    }

    public Integer updateToEnable() {
        return this.depreciationPolicyMapper.updateToEnable();
    }
}